home *** CD-ROM | disk | FTP | other *** search
-
-
-
-
-
-
-
-
-
-
-
-
-
- *********************************************
- * *
- * A STUDENT APPROACH TO *
- * FORTRAN ON AN IBM MVS/XA OPERATING SYSTEM *
- * *
- *********************************************
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- John S. Ward
- 03/10/93
-
- EJECT
- In this handout we follow step-by-step instructions in creating
- a FORTRAN program. Job Control Language (JCL) is used to demonstrate
- file linkage as well as program execution. For the purpose of this
- handout, we assume you have successfully accessed the ISPF/PDF
- PRIMARY OPTION MENU shown below:
-
- GEORGIA STATE UNIVERSITY COMPUTER CENTER
- --------------------ISPF/PDF PRIMARY OPTION MENU-----------------------
- OPTION ===>
- USER ID -userid
- 0 ISPF PARAMS -Specify terminal and user parameters TIME -14:42
- 1 BROWSE -Display source data or output listing TERMINAL -3278
- 2 EDIT -Create or change source data PF KEYS -24
- 3 UTILITIES -Perform utility functions
- 4 FOREGROUND -Invoke language procedures in foreground
- 5 BATCH -Submit job for language processing
- 6 COMMAND -Enter TSO command or CLIST
- 7 DIALOG TEST -Perform dialog testing
- 8 LM UTILITIES-Perform library management utility functions
- C CHANGE -Display summary of changes for this release
- T TUTORIAL -Display information about ISPF/PDF
- X EXIT -Terminate ISPF using log and list defaults
-
- Enter END command or PF3 to terminate ISPF.
-
-
-
- SECTION ONE: Creating your FORTRAN program.
-
-
- 1.1) Enter 6 at the "OPTION ===>" prompt of the ISPF/PDF PRIMARY OPTION
- MENU, and hit return to go to TSO COMMAND PROCESSOR panel.
-
- 1.2) Type CREATE at the cursor, and hit return. Next, type your initial
- when you are asked to "ENTER LIBRARY/APPLICATION NAME ===>". Hit
- return, and type FORTRAN at the next prompt. Hit return one more
- time when you see three asterisks displayed (hit return anytime
- you see *** displayed).
-
- 1.3) Use the F4 key to go back to the primary menu. Then, enter 2 at
- the "OPTION ===>" prompt to go to the EDIT - ENTRY PANEL.
- Fill the sections of this panel as shown below:
-
- EJECT
- ------------------------- EDIT - ENTRY PANEL ---------------------------
- COMMAND ===>
-
- ISPF LIBRARY:
- PROJECT ===> your userid
- GROUP ===> your initials ===> ===> ===>
- TYPE ===> FORTRAN
- MEMBER ===> program name (Blank for member selection list)
-
- OTHER PARTITIONED OR SEQUENTIAL DATA SET:
- DATA SET NAME ===>
- VOLUME SERIAL ===> (If not catalogued)
-
- DATA SET PASSWORD ===> (If password protected)
-
- PROFILE NAME ===> (Blank defaults to data set type)
-
- Hit return to access an empty file, and then enter your program.
- Use the TAB key to move from one line to the next.
-
- 1.4) To set the tab character, move the cursor on the quotes ('''''')
- of the first line. Type over the quotes with the command COLS
- and press return. You will then be prompted with a second set
- of quotes. Type over these quotes with the command TABS,
- and press return. Move the cursor to column seven and type
- an asterisk (*) in that column. Type an asterisk (*) in
- columns 10 and 12 as well. This will enable you to better format
- FORTRAN DO loops thus providing legibility.
- Press return followed by the HOME key. This will take your cursor
- back to the COMMAND line. Type the command RES which stands for
- RESEQUENCE. This will cause the rulers to disappear. Now that
- you have selected your TAB columns you may choose a TAB
- symbol to be used as the TAB key. Before choosing a symbol, make
- sure the character will not be used as part of the language.
- In other words, since Fortran uses the period as part of
- its sentence structure you would not want to choose this as
- your TAB key. One of the more popular symbols to choose is the
- semicolon. If you were to use the semicolon as your tab symbol,
- you would type the following command on the command line:
-
- COMMAND==> TAB ON ;
-
-
- EDIT --- User-id.Initials.FORT(member) ------------- COLUMNS 001 072
- COMMAND ===> SCROLL ===>PAGE
- ****** ********************** TOP OF DATA ***************************
- =COLS>---1----+----2----+----3----+----4----+----5----+----6----+---
- =TABS> * * * *
- ''''''
- ****** *********************BOTTOM OF DATA **************************
-
- Type the word RESET at the prompt to reset the screen.
- EJECT
- 1.5) To enter your program, move the cursor to the first asterisk
- of the line below the "COMMAND ===>" prompt. Here, type the
- letter "I" for insert and press return. You will subsequently
- be prompted for each line of data. If no data is entered,
- prompting will stop.
- You may use the TAB key in order to move from one line to the
- other. When you are ready to insert additional lines, simply
- type the letter "I" on the line number for which inserted lines
- are to follow. At this point you are ready to enter your program
- or enter additional text. You may use the semicolon any time
- you wish to tab. The first time you press the semicolon you
- will start in column 7. The second time the semicolon is pressed
- you will start in column 10. After typing your program you
- should press the home key and type the word SAVE on the COMMAND
- line. As a word of warning, any time you leave the EDIT screen,
- option 2.0, your program is automatically saved.
- Listed below is a sample FORTRAN program with the JCL necessary
- to compile, link and execute the program.
-
-
-
-
- EDIT --- userid.initials.FORT(SELECT) - 01.00 ----- COLUMNS 001 072
- COMMAND ===> SCROLL ===> PAGE
- ****** ********************** TOP OF DATA ******************************
- 000100 //STEP1 EXEC FORTVCLG
- 000200 PROGRAM SELECT
- 000300 CHARACTER NAME*20, AGE*2, EMPNUM*5
- 000400 OPEN (UNIT = 7, FILE = 'OLDMAST', STATUS = 'OLD')
- 000500 OPEN (UNIT = 8, FILE = 'NEWMAST', STATUS = 'OLD')
- 000600 10 READ (7, 20, END = 900) NAME, AGE, EMPNUM
- 000700 20 FORMAT ( 3A )
- 000800 C
- 000900 C WRITE IF NAME STARTS WITH 'D' OR GREATER
- 001000 C
- 001100 IF (NAME(1:1) .GT. 'C') WRITE (8, 20) NAME, AGE, EMPNUM
- 001200 900 STOP
- 001300 END
- 001400 //GO.OLDMAST DD DSN=user-id.init.FORT(OLDMAST),DISP=SHR
- 001500 //GO.NEWMAST DD DSN=user-id.init.FORT(NEWMAST),DISP=OLD
- ****** ********************* BOTTOM OF DATA ****************************
-
-
- All JCL starts with two slashes beginning in columns one and
- two. The Dataset Definition referred to as the "DD" statement
- is used to link the FORTRAN program to the data files on disk.
- The DD names or the input and output files (lines 1400, and
- 1500) contain the word GO followed by a period. The name
- following the "GO" is the internal link name referenced within
- the FORTRAN program. These link names are the same ones used in
- in the OPEN statements of you FORTRAN program. If you forego
- using the FORTRAN OPEN statement, the files are then linked
- using their unit device numbers. If you were using a unit
- device number of 20 for your write statement then your
- JCL link to device 20 would be FT20F001.
- The Data Set Name otherwise referred to as the DSN is used to
- define the name of the data file residing on disk. In
- addition, the data set names used in the DSN parameter
- are shown to have a disposition (DISP) of OLD or SHR. This
- means the data sets must be previously allocated before the
- program can be executed.
-
- 1.6) Hit the F4 key to go back to the PDF primary menu. You do not
- need to save your program, because once you leave that screen,
- your program is automatically saved.
-
- SECTION TWO: Creating your data files.
-
- 2.1) Type =3.2 at the "COMMAND ===>" prompt to go to the next panel.
- Use the TAB key to tab to the "TYPE ===>" prompt. Enter the name
- of your input file. Press the HOME key and enter "A" (for
- allocation) and press return. Another panel will be displayed
- as the one shown below. Use these same parameters as input
- to your panel.
-
- ------------------------ ALLOCATE NEW DATA SET -------------------------
- COMMAND ===>
-
- DATA SET NAME: User-id.Initial.Type
-
- VOLUME SERIAL ===> (Blank for authorized default volume)
- SPACE UNITS ===>TRKS (BLKS, TRKS or CYLS)
- PRIMARY QUAN ===>1 (in above units)
- SECONDARY QUAN ===>1 (in above units)
- DIRECTORY BLOCKS===>0 (zero for sequential data set)
- RECORD FORMAT ===>FB
- RECORD LENGTH ===>80 << The number of columns you expect >>
- BLOCK SIZE ===>80 << your input or output files to be >>
- You may block your records at one record
- per block in which case the record size
- will be the same as the block size.
-
-
- For the RECORD LENGTH and BLOCK SIZE sections, enter the same
- number you used in the RECORD CONTAINS clause of this file.
- Then hit return to go back to the DATA SET UTILITY panel. Tab
- to the "TYPE ===>" prompt and enter the name of your output file.
-
- 2.2) Create your output file the same way you created your input file.
-
- NOTE: The names of your input and output files have to be the same
- as the ones used in the DSN parameters of your FORTRAN program.
- If the are not, the JCL will give you an error message because
- the operating system will be looking for files that are not
- catalogued.
- EJECT
- SECTION THREE: Executing your FORTRAN program.
-
- 3.1) In order to execute your program you must be in the EDIT PANEL.
- Enter =2 at the "COMMAND ===>" prompt to go to the EDIT - ENTRY
- PANEL. Type FORT at the "TYPE ===>" prompt followed by the
- name of your program at the "MEMBER ===>" prompt. Then press
- return.
-
- 3.2) Type the command SUBT A,80 at the "COMMAND ===>" prompt
- of the panel where your program is displayed. Then, press
- return to execute your program. The "A" is the jobname
- character that will be suffixed to your userid. The batch
- job is to use no more than 80 seconds of central processing
- time.
- EXAMPLE:
-
- COMMAND ===>SUBT A,80
-
- Then, press return, and you will receive the message
-
- IKJ56250I JOB useridA(JOBnumber) SUBMITTED
- ***
- Remember the number inside parentheses.
-
- SECTION FOUR: Accessing your job output.
-
- 4.1) At the "COMMAND ===>" prompt, type =o.h to go to the SDSF or
- System Data Search Facility PANEL H option.
-
-
- _____________________________________________________________________________
- |SDSF HELD OUTPUT DISPLAY ALL CLASSES 406 LINES LINE 1-1 (1)
- |COMMAND INPUT ===> SCROLL ===> HALF
- |NP JOBNAME TYPE JNUM #DSNS CRDATE C FCB DEST ROUTE #RECORDS RNUM RD-
- | S USERIDA JOB 1139 5 8/15/91 X **** GSUMVS1 350 0275
- |____________________________________________________________________________
-
- 4.2) Tab to the field under the NP heading and type in the letter
- to view you job output.
-
-
- EJECT
- Below is a copy of a successful FORTRAN execution as viewed from the
- SDSF menu option H.
-
- BROWSE - USGHND.DAY.SPF235.OUTLIST ------------ LINE 000000 COL 001 0
- COMMAND ===> SCROLL ===>HAL
- ********************************** TOP OF DATA ***********************
- 1 J E S 2 J O B L O G -- S Y S T E M G S U 1
-
- 11.12.36 JOB 2185 ICH70001I USGHND LAST ACCESS AT 11:09:25 ON TUESDA
- 11.12.36 JOB 2185 $HASP373 USGHNDX STARTED - INIT A - CLASS A - SYS
- 11.12.45 JOB 2185 - --T
- 11.12.45 JOB 2185 -JOBNAME STEPNAME PROCSTEP RC EXCP CONN C
- 11.12.45 JOB 2185 -USGHNDX FORT 00 332 1851 .
- 11.12.45 JOB 2185 -USGHNDX LKED 00 332 1851 .
- 11.12.45 JOB 2185 -USGHNDX GO 00 332 1851 .
- 11.12.45 JOB 2185 -USGHNDX ENDED. NAME-USGHND /\ TOTAL CPU TI
- 11.12.46 JOB 2185 $HASP395 USGHNDX ENDED ||
- 0------ JES2 JOB STATISTICS ------ ||
- - 18 OCT 88 JOB EXECUTION DATE ||-------------------
- - 9 CARDS READ | A RETURN CODE (RC)
- - 152 SYSOUT PRINT RECORDS | OF ZERO MEANS YOUR
- - 0 SYSOUT PUNCH RECORDS | PROGRAM EXECUTED
- - 8 SYSOUT SPOOL KBYTES | WITHOUT ERRORS.
- - 0.17 MINUTES EXECUTION TIME |
- 1 //USGHNDX JOB I994998,USGHND, |--------------------
- // NOTIFY=USGHND,CLASS=A,MSGLEVEL=(1,1),
- // USER=USGHND,TIME=(0,5)
-
-
- 4.3) To print your output file, type O under the NP heading. Your
- output will normally be printed on one of the production
- laser printers located on the ground floor of the Library South
- building. You can change the destination by toggling to the
- field under the DEST header and overlaying the GSUMVS1
- destination. For example, if you want your output printed on
- the high-speed printer located in LS109, overlay the GSUMVS1
- with TRM1.
-
- See the SDSF handout for further information.
-
- EJECT
- SECTION FIVE: Logging off.
-
- To logoff, enter =X at the "COMMAND ===>" or "OPTION ===>"
- prompt of any panel. Once the operating system displays the
- message READY, you may then type the command LOGOFF.
- At this point you will be disconnected from the system.
-
-
- IMPORTANT NOTE:
-
- The program file, and the input and output files that you have
- just created are saved in the system. Therefore, subsequent
- executions should reference sections 3.1 through 4.4.
- EJECT
-
- COMMONLY USED FEATURES OF THE FILE EDITOR
- ISPF/PDF
-
- PROGRAM
- FUNCTION KEYS NOTE: The more frequently used keys have
- been marked with an asterisk
- F1 HELP
- F2 SPLIT SCREEN
- * F3 END
- F4 RETURN
- F5 RFIND
- F6 RCHANGE
- * F7 UP SCREEN
- * F8 DOWN SCREEN
- F9 SWAP
- * F10 LEFT SCREEN
- * F11 RIGHT SCREEN
- F12 CURSOR
-
- ------------------------------------------------------------------------
-
-
- ISPF/PDF
- MENUS
-
- * =2 EDIT
- =3.1 DELETE MEMBERS
- =3.2 DELETE DATA SETS
- =3.4 GET LISTING OF ALL DATA SETS
- =3.6 GET PROGRAMS OF DATA FILES SENT TO PRINTER
- * =3.8 DISPLAY OR PRINT JOB OUTPUT
-
- * =X EXIT OR LOGOFF SYSTEM (then type: logoff)
-
-
- ------------------------------------------------------------------------
-
- KEYBOARD NOTES
-
- ***** WHENEVER PROMPTED WITH '***' PRESS RETURN *****
- ***** IF PROMPTED WITH "READY" TO GET BACK ON THE *****
- ***** SYSTEM TYPE "ICF", OR IF YOU ARE FINISHED *****
- ***** TYPE "LOGOFF". *****
-
- ***** IF KEYBOARD FREEZES, PRESS THE TAB KEY *****
- ***** IF STILL FROZEN, PRESS THE return key *****
- ***** IF STILL FROZEN, PRESS CNTL G *****
- ***** IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 2 *****
- ***** IF KEYBOARD IS STILL LOCKED UP, PRESS ALT 1 *****
-
- ------------------------------------------------------------------------
-
-
-